package com.bw.controller;

import com.alibaba.fastjson.JSONObject;
import com.bw.pojo.GoodsType;
import com.bw.service.impl.GoodsTypeServiceImpl;
import com.bw.util.JDBCUtil;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

@WebServlet("/goodsType/*")
public class GoodsTypeController extends BaseController{
    GoodsTypeServiceImpl service = new GoodsTypeServiceImpl();
    protected void goodsType(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        List<GoodsType> list = service.goodsType();
        resp.getWriter().println(JSONObject.toJSONString(list));
    }
}
